home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
usr
/
sbin
/
update-icon-caches
< prev
next >
Wrap
Text File
|
2008-10-18
|
674b
|
29 lines
#!/bin/sh
case "$1" in
""|-h|--help)
echo "Usage: $0 directory [ ... ]"
exit 1
;;
esac
for dir in "$@"; do
if [ ! -d "$dir" ]; then
continue
fi
if [ -f "$dir"/index.theme ]; then
if [ -f "$dir"/icon-theme.cache ]; then
# The cache already exists, regenerate it
if ! gtk-update-icon-cache --force --quiet "$dir"; then
echo "WARNING: icon cache generation failed for $dir"
fi
fi
else
# No more index.theme, remove the cache if it exists
rm -f "$dir"/icon-theme.cache
rmdir -p --ignore-fail-on-non-empty "$dir"
fi
done
exit 0